package com.cictec.middleware.tde.rm.disp.receiver.handler;

import org.apache.mina.core.session.IoSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.cictec.middleware.tde.rm.disp.annotation.HandleMessages;
import com.cictec.middleware.tde.rm.disp.receiver.AbstractReceiverHandler;
import com.cictec.middleware.tde.rm.protocol.TerminalMessage;

/**
 * 线路切换 (上传终端线路配置信息，接收指令应答确认)
 * 
 * @author Administrator
 *
 */
@Component
@HandleMessages(0x29)
public class TerminalLineChangeHandler extends AbstractReceiverHandler {

	private static Logger logger = LoggerFactory.getLogger(TerminalLineChangeHandler.class);

	@Override
	public void handleMessage(TerminalMessage message, IoSession session) {

		sendMessageToTerminal(createResponse(message), session);

		logger.debug("【0x29 线路切换 】终端 {}  Session {} ", message.getTerminalId(), message.getSessionId());
	}

}
